import Layout from "@/views/layout/index.vue";
const routes = [
  {
    path: '/login',
    component: () => import("@/views/login/index.vue"),
    meta: { title: "星轻食", hidden: true, notNeedAuth: true }
  },
  {
    path: '/',
    component: Layout,
    redirect: 'home',
    children: [
      {
        path: '/home',
        component: () => import("@/views/Home/index.vue"),
        name: 'home',
        meta: {
          title: "首页",
        }
      },
      {
        path: '/dashboard',
        component: () => import("@/views/dashboard/index.vue"),
        name: 'Dashboard',
        meta: {
          title: "工作台",
        }
      },
      {
        path: '/statistics',
        component: () => import("@/views/statistics/index.vue"),
        meta: {
          title: "数据统计",
        }
      },
      {
        path: '/order',
        component: () => import("@/views/order/index.vue"),
        meta: {
          title: "订单管理",
        }
      },
      {
        path: '/order/detail',
        component: () => import("@/views/order/orderDetail.vue"),
        meta: {
          title: "订单详细",
        }
      },
      {
        path: '/category',
        component: () => import("@/views/category/index.vue"),
        meta: {
          title: "分类管理",
        }
      },
      {
        path: '/dish',
        component: () => import("@/views/dish/index.vue"),
        meta: {
          title: "菜品管理",
        }
      },
      {
        path: '/dish/detail',
        component: () => import("@/views/dish/dishDetail.vue"),
        meta: {
          title: "添加菜品",
          hidden: true
        }
      },
      {
        path: '/setmeal',
        component: () => import("@/views/setmeal/index.vue"),
        meta: {
          title: "套餐管理",
        }
      },
      {
        path: '/setmeal/detail',
        component: () => import("@/views/setmeal/setmealDetail.vue"),
        meta: {
          title: "添加套餐",
          hidden: true
        }
      },
      {
        path: "/business",
        component: () => import("@/views/employee/index.vue"),
        meta: {
          title: "商家管理",
        }
      },
      {
        path: "/business/detail",
        component: () => import("@/views/employee/employeeDetail.vue"),
        meta: {
          title: "添加商家",
          hidden: true
        }
      },
      {
        path: "/user",
        component: () => import("@/views/user/index.vue"),
        meta: {
          title: "用户管理",
        }
      },
      {
        path: "/admin",
        component: () => import("@/views/admin/index.vue"),
        meta: {
          title: "系统管理",
        }
      },
      {
        path: "/admin/detail",
        component: () => import("@/views/admin/adminDetail.vue"),
        meta: {
          title: "系统管理",
        }
      },
      {
        path: "/profile",
        component: () => import("@/views/profile/index.vue"),
        meta: {
          tilte: "个人中心"
        }
      },
      {
        path: "/profile/avatar",
        component: () => import("@/views/profile/avatar.vue"),
        meta: {
          tilte: "修改头像"
        }
      },
      {
        path: "/profile/pwd",
        component: () => import("@/views/profile/password.vue"),
        meta: {
          tilte: "修改密码"
        }
      },
      {
        path: "/list",
        component: () => import("@/views/list/index.vue"),
        meta: {
          tilte: "列表"
        }
      },
    ]
  },
    {
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/404.vue'),
    meta: {title: "星轻食", hidden: true,notNeedAuth: true}
  },

]
export default routes